/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.blog.city.checkthedep.sessionbeans;

import com.blog.city.checkthedep.entities.Article;
import java.util.List;
import javax.ejb.Local;

/**
 *
 * @author Breath
 */
@Local
public interface ArticleFacadeLocal {

    /**
     * 
     * @param article
     */
    void create(Article article);

    /**
     * 
     * @param article
     */
    void edit(Article article);

    /**
     * 
     * @param article
     */
    void remove(Article article);

    /**
     * 
     * @param id
     * @return
     */
    Article find(Object id);

    /**
     * 
     * @return
     */
    List<Article> findAll();

    /**
     * 
     * @param range
     * @return
     */
    List<Article> findRange(int[] range);

    /**
     * 
     * @return
     */
    int count();


    /**
     * 
     * @return
     */
    public List<Article> latestArticles();

    /**
     * 
     * @param regId
     * @return
     */
    public java.util.List<com.blog.city.checkthedep.entities.Article> findByRegUserId(com.blog.city.checkthedep.entities.RegisteredUser regId);
   
    /**
     * 
     * @return
     */
    public java.util.List<com.blog.city.checkthedep.entities.Article> findAllTestArticles();

    /**
     * 
     * @param art
     * @return
     */
    public java.util.List<com.blog.city.checkthedep.entities.Category> findCategoryByArticleNotUsed(com.blog.city.checkthedep.entities.Article art);

    /**
     * 
     * @param status
     * @return
     */
    public java.util.List<com.blog.city.checkthedep.entities.Article> findArticlesByStatus(java.lang.String status);

    /**
     * 
     * @return
     */
    public java.util.List<com.blog.city.checkthedep.entities.Article> latestPublishedArticlesForTest();

    /**
     * 
     * @return
     */
    public java.util.List<com.blog.city.checkthedep.entities.Article> latestPublishedArticles();

    /**
     * 
     * @param art
     * @return
     */
    public java.util.List<com.blog.city.checkthedep.entities.Category> findCategoryByArticle(com.blog.city.checkthedep.entities.Article art);

    /**
     * 
     * @param regId
     * @return
     */
    public java.util.List<com.blog.city.checkthedep.entities.Article> findByAuthor(com.blog.city.checkthedep.entities.RegisteredUser regId);

    /**
     * 
     * @param month
     * @return
     */
    public java.util.List<com.blog.city.checkthedep.entities.Article> findArticleBymonth(java.lang.Integer month);
    
    public boolean articleHasComments(com.blog.city.checkthedep.entities.Article artId);

}
